j3deditor.bin.editor
Class SceneBuffer

java.lang.Object
  extended by j3deditor.bin.editor.SceneBuffer
All Implemented Interfaces:
BackgroundTask

public class SceneBuffer
extends java.lang.Object
implements BackgroundTask

Utility that updates the image of a Scene2D in another low priority thread.

Author:
Risto Seene

Constructor Summary
SceneBuffer(Scene2D scene)
          Creates an instance of SceneBuffer which updates the image shown on the specified Scene2D.
 
Method Summary
 java.awt.Image getImage()
          Returns the image of the valid buffer.
 void process()
          Draws the scene into the backbuffer.
protected  void updateImage()
          Schedules this image to updation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SceneBuffer

public SceneBuffer(Scene2D scene)
Creates an instance of SceneBuffer which updates the image shown on the specified Scene2D.

Parameters:
scene - Scene2D which image this SceneBuffer updates.
Method Detail

updateImage

protected void updateImage()
Schedules this image to updation.


getImage

public java.awt.Image getImage()
Returns the image of the valid buffer.

Returns:
the image of the valid buffer

process

public void process()
Draws the scene into the backbuffer. After that flips the buffers and updates the Scene2D.

Specified by:
process in interface BackgroundTask